package com.itheima.wemedia.controller;

import com.itheima.common.vo.ResultVo;
import com.itheima.wemedia.service.WmUserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/login")
@Api("自媒体管理")
public class LoginController {
    @Autowired
    private WmUserService wmUserService;
    @ApiOperation("自媒体登录请求接口")
    @PostMapping("/in")
    public ResultVo login(@RequestBody Map<String ,Object> map){
        //调用service层的方法进行业务处理
        ResultVo resultVo = wmUserService.login(map);
        return resultVo;
    }
}
